<?php

class SkillGroup extends Frank implements iFrank {

    //Properties
    private $displayOrder;

    public function __construct($id, $name, $displayOrder) {
        $this->id = $id;
        $this->name = $name;
        $this->displayOrder = $displayOrder;
    }

    public static function getObject($row) {
        return new SkillGroup($row["group_id"], $row["group_name"], $row["group_display_order"]);
    }

    public static function getAll($toArray = false, $fields = null, $query = null, $db = null) {
        $query = 'select * from `' . SKILL_GROUP_TABLE . '` order by group_display_order asc';
        return parent::getAll($toArray, $fields, $query, $db);
    }

    public static function getById($id, $toArray = false, $fields = null, $query = null, $db = null) {
        $query = 'select * from `' . SKILL_GROUP_TABLE . '` where group_id = ' . $id;
        return parent::getById($id, $toArray, $fields, $query, $db);
    }

}

?>